package com.x_memteor.base_master.bean.response;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.util.List;

/**
 * @author: X_Meteor
 * @description: 类描述
 * @version: V_1.0.0
 * @date: 2018/3/14 0014 上午 10:58
 * @company:
 * @email: lx802315@163.com
 */
public class GetProfileBean implements Parcelable {
    /**
     * state : 1
     * msg :
     * data : {"sex":1,"age":18,"height":168.05}
     */

    private int state;
    private String msg;
    private Object data;
    private List<?> emptyData;

    public List<?> getEmptyData() {
        return emptyData;
    }

    public void setEmptyData(List<?> emptyData) {
        this.emptyData = emptyData;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Object getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public static class DataBean implements Parcelable {
        /**
         * sex : 1
         * age : 18
         * height : 168.05
         */

        private int sex;
        private int age;
        private double height;

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public int getAge() {
            return age;
        }

        public void setAge(int age) {
            this.age = age;
        }

        public double getHeight() {
            return height;
        }

        public void setHeight(double height) {
            this.height = height;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(this.sex);
            dest.writeInt(this.age);
            dest.writeDouble(this.height);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.sex = in.readInt();
            this.age = in.readInt();
            this.height = in.readDouble();
        }

        public static final Creator<DataBean> CREATOR = new Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.state);
        dest.writeString(this.msg);
//        dest.writeParcelable(this.data, flags);
    }

    public GetProfileBean() {
    }

    protected GetProfileBean(Parcel in) {
        this.state = in.readInt();
        this.msg = in.readString();
        this.data = in.readParcelable(DataBean.class.getClassLoader());
    }

    public static final Parcelable.Creator<GetProfileBean> CREATOR = new Parcelable.Creator<GetProfileBean>() {
        @Override
        public GetProfileBean createFromParcel(Parcel source) {
            return new GetProfileBean(source);
        }

        @Override
        public GetProfileBean[] newArray(int size) {
            return new GetProfileBean[size];
        }
    };
}
